<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<form id="pagerForm" method="post" action="getReportAction/queryProvideRecordPager.action">
	<input type="hidden" name="pageNum" value="${pager.currentPage}" />
	<input type="hidden" name="numPerPage" value="${pager.pageSize}" />
	<%-- <input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" /> --%>
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="getReportAction/queryProvideRecordPager.action" method="post">
	<div class="searchBar">
		单位名称：<input type="text" name="keywords" alt="按单位名称模糊查询" value="${keywords}" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		日期：自 <input type="text" name="beginDate" class="date" readonly="true" value="${beginDate}"/>日后—到 <input type="text" name="endDate" class="date" readonly="true" value="${endDate}"/>前  
		<button type="submit">检索</button>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<!-- <li><a class="icon" href="getReportAction/exportPorvideRecord.action?keywords=${keywords}&beginDate=${beginDate}&endDate=${endDate}"><span>导出</span></a></li> -->
			<li><a class="icon" href="javascript:window.location.href='getReportAction/exportPorvideRecord.action?keywords=${keywords}&beginDate=${beginDate}&endDate=${endDate}'"><span>导出</span></a></li>
		</ul>
	</div>
	<div id="w_list_print">
		<table class="table" width="100%" targetType="navTab"  asc="asc" desc="desc" layoutH="160">
			<thead>
				<tr align="center">
					<th width="30">序号</th>
					<th width="200">单位名称</th>
					<th width="150">申请时间</th>
					<th width="100">项目编号</th>
					<th width="120">采购预算(元)</th>
					<th width="100">采购金额(元)</th>
					<th width="100">节约资金(元)</th>
					<th width="70">节约率(%)</th>
					<th width="450">物品名称</th>
					<th width="470">供应商</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${pager.dataList}" var="pager" varStatus="vs">
					<tr align="center">
						<td>${vs.index+1}</td>
						<c:if test="${fn:length(pager.unitName) < 15}">
							<td>${pager.unitName}</td>
						</c:if>
						<c:if test="${fn:length(pager.unitName) > 14}">
							<td title="${pager.unitName}">${fn:substring(pager.unitName,0,14)}...</td>
						</c:if>
						<td>${pager.createTime}</td>
						<td>${pager.projectNumber}</td>
						<td><fmt:formatNumber value="${pager.em}" type ="currency" pattern="0.00"/></td>
						<td><fmt:formatNumber value="${pager.dm}" type ="currency" pattern="0.00"/></td>
						<td><fmt:formatNumber value="${pager.jyzj}" type ="currency" pattern="0.00"/></td>
						<td><fmt:formatNumber value="${pager.jyl}" type ="currency" pattern="0.00"/></td>
						<c:if test="${fn:length(pager.goodName) < 41}">
							<td>${pager.goodName}</td>
						</c:if>
						<c:if test="${fn:length(pager.goodName) > 40}">
							<td title="${pager.goodName}">${fn:substring(pager.goodName,0,40)}...</td>
						</c:if>
						<c:if test="${fn:length(pager.supplierName) < 36}">
							<td>${pager.supplierName}</td>
						</c:if>
						<c:if test="${fn:length(pager.supplierName) > 35}">
							<td title="${pager.supplierName}">${fn:substring(pager.supplierName,0,35)}...</td>
						</c:if>
					</tr>
				</c:forEach>
	
			</tbody>
		</table>
	</div>
	
	<div class="panelBar" >
		<div class="pages">
			<span>显示</span>
			<select name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
			
				<option value="20" <c:if test="${pager.pageSize == 20}">selected=selected</c:if>>20</option>
				<option value="50" <c:if test="${pager.pageSize == 50}">selected=selected</c:if>>50</option>
				<option value="100" <c:if test="${pager.pageSize == 100}">selected=selected</c:if>>100</option>
				<option value="200" <c:if test="${pager.pageSize == 200}">selected=selected</c:if>>200</option>
			</select>
			<span>条，共${pager.totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${pager.totalCount}" numPerPage="${pager.pageSize}" pageNumShown="10" currentPage="${pager.currentPage}"></div>

	</div>

	<div id="w_list_print">
	<table class="table" width="100%" targetType="navTab"  asc="asc" desc="desc" layoutH="116">
		<thead>
			<tr align="center">
				<th width="100"></th>
			    <th width="200">总采购预算(元)</th>
				<th width="200">总采购金额(元)</th>
				<th width="200">总节约资金(元)</th>
				<th width="200">总节约率(%)</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="listCount" items="${listCountAll}" varStatus="vs">
				<tr align="center">
					<td>合计</td>
					<td>${listCount.zem}</td>
					<td>${listCount.zdm}</td>
					<td>${listCount.zjyzj}</td>
					<%-- <td><fmt:formatNumber value="${listCountAll.zem}" type ="currency" pattern="0.00"/></td>
					<td><fmt:formatNumber value="${listCountAll.zdm}" type ="currency" pattern="0.00"/></td>
					<td><fmt:formatNumber value="${listCountAll.zjyzj}" type ="currency" pattern="0.00"/></td> --%>
					<td>${listCount.zjyl}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	</div>
</div>
